#############################################################################################################
# Immigration and Incorporation: Asian American Representation in State Legislatures
# Michael Kistner and Tanika Raychaudhuri                                                 
# State Politics and Policy Quarterly                                                                  
# README File                                                                                              
#############################################################################################################

This file outlines the software, code, and data used to produce the results presented in "Immigration and 
Incorporation: Asian American Representation in State Legislatures,"  by Michael Kistner and Tanika 
Raychaudhuri.


#############################################################################################################
	## Scripts ##
#############################################################################################################

	"Figures and Tables for Data Section.R"
		Code for creating Figure 1 and Table S2. Should take less than one minute to run. 

	"Figures and Tables for State-Level Analysis.R" 
		Code for creating Table 1, Figure 2, Table S4, and Table S5. Should take less than one minute 
		to run. 

	"Figures and Tables for District-Level Analysis.R" 
		Code for creating Figure 3, Figure S3, Table S5, Table S6, Figure S7, and Table S7. Should 
		take less than one minute to run. 


#############################################################################################################
	## Data ##
#############################################################################################################

	All of the datasets and the variables contained within are fully described in 
	"Codebook for Asian American Representation in State Legislatures.docx"	
	
	Dataset #1: "Legislator Race Data.csv"
			Dataset comes from Carl Klarner (https://www.klarnerpolitics.org/datasets-1).	

	Dataset #2: "Legislator and District Data.csv"
			Dataset constructed using "Legislator Race Data.csv" and American Community 
			survey data (https://www.census.gov/programs-surveys/acs)
			
	Dataset #3: "State by Decade Data.csv"
			Dataset constructed using "Legislator Race Data.csv" and decennial U.S. Census 
			data (https://www.census.gov/programs-surveys/decennial-census/data.html) 

	Dataset #4: "Asian Population and State Legislative Representation (1970 - 2020).csv"
			Dataset constructed using "Legislator Race Data.csv",  American Community 
			survey data (https://www.census.gov/programs-surveys/acs), and data on
			state legislative district ideology provided by Chris Tausanovitch and
			Chris Warshaw (https://americanideologyproject.com/).

	Dataset #5: "District Geodata.Rda"
			Dataset constructed using "Legislator Race Data.csv" and American Community 
			survey data (https://www.census.gov/programs-surveys/acs).


#############################################################################################################
	## Software Dependencies ##
#############################################################################################################

	All analyses were originally undertaken in R version 4.4.0 "Puppy Cup" on a PC system running
	Windows 10. 

	Package versions used in original analysis:

	attached base packages:
	[1] stats     graphics  grDevices utils     datasets  methods   base     

	other attached packages:
 	[1] usmap_0.7.1        scales_1.3.0       cowplot_1.1.3      lubridate_1.9.4   
 	[5] forcats_1.0.0      stringr_1.5.1      dplyr_1.1.4        purrr_1.0.2       
 	[9] readr_2.1.5        tidyr_1.3.1        tibble_3.2.1       tidyverse_2.0.0   
	[13] modelsummary_1.4.5 ggcorrplot_0.1.4.1 ggplot2_3.5.1      fixest_0.12.0     
	[17] car_3.1-2          carData_3.0-5     

	loaded via a namespace (and not attached):
 	[1] sandwich_3.1-0      utf8_1.2.4          generics_0.1.3      stringi_1.8.4      
 	[5] dreamerr_1.4.0      lattice_0.22-6      hms_1.1.3           digest_0.6.35      
 	[9] magrittr_2.0.3      timechange_0.3.0    grid_4.4.0          fastmap_1.2.0      
	[13] Formula_1.2-5       fansi_1.0.6         stringmagic_1.1.2   numDeriv_2016.8-1.1
	[17] abind_1.4-5         cli_3.6.2           rlang_1.1.3         munsell_0.5.1      
	[21] withr_3.0.0         tools_4.4.0         tzdb_0.4.0          colorspace_2.1-0   
	[25] vctrs_0.6.5         R6_2.5.1            zoo_1.8-12          lifecycle_1.0.4    
	[29] insight_0.19.11     pkgconfig_2.0.3     pillar_1.9.0        gtable_0.3.5       
	[33] glue_1.7.0          Rcpp_1.0.12         xfun_0.44           tidyselect_1.2.1   
	[37] rstudioapi_0.16.0   knitr_1.46          htmltools_0.5.8.1   nlme_3.1-164       
	[41] tables_0.9.25       compiler_4.4.0     
		